package training.bms.presentation;

import javax.faces.bean.ManagedBean;

import training.bms.business.Post;
import training.bms.business.PostController;

@ManagedBean
public class ShowPost {
	private Post post;
	
	public void setPostIdentifier(Integer postIdentifier){
		PostController controller = new PostController();
		post = controller.searchEntity(postIdentifier);
	}
	
	public Integer getPostIdentifier(){
		if(post == null){
			return null;
		}else{
			return post.getIdentifier();
		}
	}

	public Post getPost() {
		return post;
	}	
}
